package com.ys.web.mobao.model.po;

import com.ys.utils.base.j2se.StringHandler;
import com.ys.web.mobao.vo.SystemBankVo;
import lombok.Data;

/**
 * @author quxinjun
 * @version 1.0.0
 * @ClassName SystemBankPO.java
 * @Description TODO
 * @createTime 2022年02月16日 12:42:00
 */
@Data
public class SystemBankPO {

    public int id;
    public String bankName;
    public String bankCode;
    public String bankUrlImg;
    public String supportCreditCard;
    public String supportDebitCard;
    public String tips;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankCode() {
        return bankCode;
    }

    public void setBankCode(String bankCode) {
        this.bankCode = bankCode;
    }

    public String getBankUrlImg() {
        return bankUrlImg;
    }

    public void setBankUrlImg(String bankUrlImg) {
        this.bankUrlImg = bankUrlImg;
    }

    public SystemBankVo systemBankVo(){
        SystemBankVo systemBankVo = new SystemBankVo();
        systemBankVo.id = this.id;
        systemBankVo.bankName = this.bankName;
        systemBankVo.bankCode = this.bankCode;
        systemBankVo.bankUrlImg = this.bankUrlImg;
        String tips = this.bankName();
        if(StringHandler.isNotEmpty(tips)){
            systemBankVo.bankName = this.bankName+"("+tips+")";
        }
        return systemBankVo;
    }

    public SystemBankVo systemBankHjzfVo(){
        SystemBankVo systemBankVo = new SystemBankVo();
        systemBankVo.id = this.id;
        systemBankVo.bankName = this.bankName;
        systemBankVo.bankCode = this.bankCode;
        systemBankVo.bankUrlImg = this.bankUrlImg;
        return systemBankVo;
    }
    public SystemBankVo systemBankVoMb(){
        SystemBankVo systemBankVo = new SystemBankVo();
        systemBankVo.id = this.id;
        systemBankVo.bankName = this.bankName;
        systemBankVo.bankCode = this.bankCode;
        systemBankVo.bankUrlImg = this.bankUrlImg;
        return systemBankVo;
    }
    public String bankName(){
        if(this.supportDebitCard.equals("Y") && this.supportCreditCard.equals("Y")){
            return "储蓄卡/信用卡";
        }
        if(this.supportDebitCard.equals("Y") && this.supportCreditCard.equals("N")){
            return "信用卡";
        }
        if(this.supportDebitCard.equals("N") && this.supportCreditCard.equals("Y")){
            return "储蓄卡";
        }
        if(this.supportDebitCard.equals("N") && this.supportCreditCard.equals("N")){
            return "";
        }
        return "";
    }
}
